* May 23, 2025
* Duffy, Lebeau, Puzzello

* This file replicates the statistical tests reported in the text and Table 3.

*************
*** Setup ***
*************

* Set directory HERE
* cd "c:\user|lenovo\desktop\replication_DLP\utility" \\ Example
cd "c:\...\replication_DLP\utility"

************************************
*** Wilcoxon Tests for Finding 2 ***
************************************

use MeanSessionData.dta

signrank mqall=4 if treat==315, exact
ttest mqall==4 if treat==315
signrank mtall=118.91 if treat==315, exact
ttest mtall==118.91 if treat==315

*********************************
*** Table 3: Jonckheere tests ***
*********************************

use tests.dta

* If needed, install jonter package by uncommenting and running the command below
* ssc inst jonter

jonter q, by(m) verbose
jonter q1, by(m) verbose
jonter q2, by(m) verbose
jonter y, by(m) verbose
jonter y1, by(m) verbose
jonter y2, by(m) verbose
jonter s, by(m) verbose
jonter s1, by(m) verbose
jonter s2, by(m) verbose
jonter ss, by(m) verbose
jonter ss1, by(m) verbose
jonter ss2, by(m) verbose
jonter bs, by(m) verbose
jonter bs1, by(m) verbose
jonter bs2, by(m) verbose
jonter bsh, by(m) verbose
jonter bsh1, by(m) verbose
jonter bsh2, by(m) verbose

* The KS and BD tests contained in "main_results_1.do"

****************************
*** Mann - Whitney tests ***
****************************

use tests.dta

ranksum bs if treat==1|treat==2, by(treat)
ranksum bs if treat==1|treat==3, by(treat)
ranksum bs if treat==2|treat==3, by(treat)

